<!-- /ezadm/template/user/admin_update.htm :: 2011-01-07 :: btslove //-->
<script type="text/javascript">
//<![CDATA[
$(function() {
	f = document.forms['update_form'];

	//폼체크
	var container1 = $("div#lay_error_container1");
	$("form[name=update_form]").validate({
		errorContainer: container1,
		errorLabelContainer: $("ol", container1),
		wrapper: "li",
		rules: {
			mb_eml: {
				email: true
			},
			mb_tel: {
				tel: true
			},
			mb_hp: {
				hp: true
			}
		},
		submitHandler: function(form) {
			//set_group();
			form.submit();
		}
	});

	//웹표준을 위해 임시로 생성된 select => option 을 제거한다.
	$("#temp_opt").remove();
});

//그룹값을 설정한다.
function set_group()
{
	var groups = '';
	for (var i=0; i<f.elements['dst_group'].length; i++)
	{
		if (i) groups += ',';
		groups += f.elements['dst_group'][i].value;
	}
	f.elements['groups'].value = groups;
}

$(function(){
	$("select[name=mb_level]").css("border","0");
});
//]]>
</script>
<!------------------------ 회원 입력 시작 ▼▼▼//------------------------>
<form name='update_form' method='post' action="<?=$_SERVER['PHP_SELF']?>" target='form_receiver'>
<input type="hidden" name="g_job" value="<?=$g_job?>" />
<input type="hidden" name="g_subjob" value="update" />
<input type="hidden" name="mb_id" value="<?=$member_record['mb_id']?>" />
<input type="hidden" name="groups" value="" />
<table class='form2'>
<col width='17%'><col width='33%'><col width='17%'><col width='33%'>
	<tr>
		<th>아이디</th>
		<th class="static"><?=$member_record['mb_id']?></th>
		<th>레벨</th>
		<?php if ($User->is_super_admin()) { ?>
		<td><?=$Html->full_select_form('mb_level', $User->get_levels(), $member_record['mb_level'])?></td>
		<?php } else { ?>
		<th class="static"><?=$User->get_level_name($member_record['mb_level'])?></th>
		<?php } ?>
	</tr>
	<tr>
		<th>비밀번호변경</th>
		<td><input type="password" name="mb_pw" class="full" maxlength="16" title="비밀번호를 입력하세요.(4~16자리)" /></td>
		<th>비밀번호확인</th>
		<td><input type="password" name="mb_repw" class="full" title="비밀번호를 다시 한번 입력하세요." /></td>
	</tr>
	<tr>
		<th class="required">성명</th>
		<td><input type="text" name="mb_name" class="full required" value="<?=$member_record['mb_name']?>" title="성명을 입력하세요." /></td>
		<th>이메일</th>
		<td><input type="text" name="mb_eml" class="full" value="<?=$member_record['mb_eml']?>" title="이메일 형식에 맞게 입력하세요." /></td>
	</tr>
	<tr>
		<th>일반전화</th>
		<td><input type="text" name="mb_tel" class="full" value="<?=$member_record['mb_tel']?>" title="일반전화 형식에 맞게 입력하세요." /></td>
		<th>휴대전화</th>
		<td><input type="text" name="mb_hp" class="full" value="<?=$member_record['mb_hp']?>" title="휴대전화 형식에 맞게 입력하세요." /></td>
	</tr>
	<tr>
		<th>등록시각</th>
		<th class="disabled"><?=date('Y-m-d', $member_record['mb_ctime'])?></th>
		<th>수정시각</th>
		<th class="disabled"><?php if ($member_record['mb_utime']) { ?><?=date('Y-m-d', $member_record['mb_utime'])?><?php } ?></th>
	</tr>
	<?php if ($member_record['mb_ltime']) { ?>
	<tr>
		<th>최근접속시각</th>
		<th class="disabled"><?=date('Y-m-d', $member_record['mb_ltime'])?></th>
		<th>접속아이피</th>
		<th class="disabled"><?=$member_record['mb_lip']?></th>
	</tr>
	<?php } ?>
</table>
<div id="lay_error_container1" class="error_container">
	<ol>
		<li>에러 메세지!!</li>
	</ol>
</div>

<div class="util">
	<input type='submit' class='button' value='수정' />
	<input type='reset' class='button' value='초기화' />
	<input type='button' class='button' value='닫기' onclick='self.close();' />
</div>
</form>
<!------------------------ 회원 입력 끝 ▲▲▲//------------------------>